OBJS=$(patsubst %.c,%.o,$(wildcard ./*.c))
TARGET=main

$(TARGET): $(OBJS)
	gcc $^ -o $@

# 模式匹配
%.o: %.c
	gcc -c $^ -o $@

clean:
	rm -rf *.o $(TARGET)
